#include "raster.h"
#include <vector>
#include <iterator>
#include <iostream>

namespace std 
{
	ostream& operator<<(ostream &s, const Cell &c)
	{
		return s << c.p << "\n";
	}
}

int main()
{	
	Point fst, scnd;
	std::cin >> fst.x >> fst.y >> scnd.x >> scnd.y;

	if (scnd < fst)
	{
		std::swap(fst, scnd);
	}

	std::copy(cell_iterator(fst, scnd), cell_iterator(), std::ostream_iterator<Cell>(std::cout));
}